/**
 * @Author: 九璃怀特 1599130621@qq.com
 * @Date: 2023-10-16 15:40:55
 * @LastEditors: 九璃怀特 1599130621@qq.com
 * @LastEditTime: 2023-10-19 16:55:51
 * @FilePath: \vast-system\vite.config.ts
 * @Description:
 */
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import path from "path";
import vueJsx from "@vitejs/plugin-vue-jsx";


// https://vitejs.dev/config/
export default defineConfig(
  {
    server: {
      port: 2023,
      host: true,
      open: true,
      proxy: {
        '/api':'http://localhost:3000'
      }
    },
    plugins: [vue(), vueJsx()],
    base: "./",
    resolve: {
      alias: [
        {
          find: "src",
          replacement: path.resolve(__dirname, "src"),
        },
        {
          find: "views",
          replacement: path.resolve(__dirname, "src/views"),
        },
        {
          find: "utils",
          replacement: path.resolve(__dirname, "src/utils"),
        },
        {
          find: "assets",
          replacement: path.resolve(__dirname, "src/assets"),
        },
        {
          find: "Gab",
          replacement: path.resolve(__dirname, "src/pioneers/Gab"),
        },
        {
          find: "~",
          replacement: path.resolve(__dirname, "src/components")
        },
        {
          find: "@",
          replacement: path.resolve(__dirname, "src/interfaceConfig")
        }
      ],
    },
  },
);
